<template>
  <div class="person">
    {{ num }}
    <br>
    <button @click="addNum()">点我加1</button>
    <hr />
    <img v-for="(dog, index) in dogList" :src="dog" :key="index">
    <hr />
    <button @click="addDog()">来一只小狗</button>
  </div>
</template>

<script lang="ts" setup name="Person">
import useNum from '../hooks/useNum.js'
import useDog from '../hooks/useDog.js'

let { num, addNum } = useNum();
let { dogList, addDog } = useDog();


</script>
<style scoped>
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}

button {
  margin: 0 5px;
}


img {
  height: 100px;
  margin-left: 10px;
}
</style>